package com.service.impl;

import com.dao.CourseDao;
import com.pojo.Course;
import com.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CourseServiceImpl implements CourseService {
    @Autowired
    private CourseDao courseDao;
    @Override
    public int addCourse(Course course) {
        return courseDao.addCourse(course);
    }

    @Override
    public int deleteCourseById(long id) {
        return courseDao.deleteCourseById(id);
    }

    @Override
    public int updateCourse(Course course) {
        return courseDao.updateCourse(course);
    }

    @Override
    public Course queryById(long id) {
        return courseDao.queryById(id);
    }

    @Override
    public List<Course> queryAllCourse() {
        return courseDao.queryAllCourse();
    }

    @Override
    public List<Course> getListById(long id) {
        return courseDao.getListById(id);
    }
}
